<script>
function fill(id,no,name,detail,size,weight) {
    $(window.parent.fill(id,no,name,detail,size,weight)); 
	window.parent.$.fancybox.close();
}  
</script>
<style>
td {
	border:solid #68BADA;
	border-width:0px 1px 1px 0px;
	padding:5px;
	text-align:center
}
table {
	border:solid #68BADA;
	border-width:1px 0px 0px 1px;
}
.odd {
	background:none repeat scroll 0 0 #EEEEEE;
}
.even {
	background:none repeat scroll 0 0 #FFFFFF;
}
.three {
	background:none repeat scroll 0 0 #E5F1F4;
}
.jg {
	background:none repeat scroll 0 0 #ADD9ED;
}
.head {
	background:none repeat scroll 0 0 #90D8F0;
}
input, img {
	vertical-align:middle;
}
.container{
	width:800px;
}
</style>
<div style="width:100%; float:left; margin-bottom:10px; text-align:right;">
	<form action="<?=Yii::app()->createUrl('order/index')?>" name="jobForm" id="jobForm" method="get">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="20%"><?php echo $labels['ProductModel']; ?></td>
			<td><input type="text" name="ProductModel" value="<?php if(isset($search['ProductModel']))echo $search['ProductModel'];?>" id="ProductModel" size="60" /></td>			
		</tr>
		<tr>
			<td><?php echo $labels['ProductName']; ?></td>
			<td><input type="text" name="ProductName" value="<?php if(isset($search['ProductName']))echo $search['ProductName'];?>" id="ProductName" size="60" /></td>			
		</tr>
		<tr>
			<td><?php echo $labels['ProductDetail']; ?></td>
			<td><input type="text" name="ProductDetail" value="<?php if(isset($search['ProductDetail']))echo $search['ProductDetail'];?>" id="ProductDetail" size="60" /></td>			
		</tr>		
		<tr>
			<td colspan="2" style="text-align:right;"><input type="image" src="images/go.png" name="jobSub" id="jobSub" value="Go" /></td>			
		</tr>
	</table>		
		<input type="hidden" name="r" value="psi/productpop" />
	</form>
</div>
<table cellspacing="0" cellpadding="0" width="100%" class="tbl" style="float:left;">
	<tr class="head">
		<td width="8%"><?php echo $labels['ProductID']; ?></td>
		<td width="12%"><?php echo $labels['ProductModel']; ?></td>		
		<td width="10%"><?php echo $labels['PModel_2']; ?></td>
		<td width="25%"><?php echo $labels['ProductName']; ?></td>
		<td width="35%"><?php echo $labels['ProductDetail']; ?></td>
		<td>选择</td>
	</tr>
	<?php
    $i = 0;
    $cssArr = array(0 => 'even', 1 => 'odd', 2 => 'three');
    foreach ($rowTable as $item) {
        $trClass = $cssArr[$i % 3];
        $i++;
        ?>
	<tr class="<?= $trClass ?>">
		<td>
			<?=$item->ProductID?>
		</td>
		<td>
			<?=$item->ProductModel?>
		</td>
		<td>
			<?=$item->PModel_2?>
		</td>
		<td>
			<?=$item->ProductName?>
		</td>
		<td>
			<?=$item->ProductDetail?>
		</td>
		<td>		
			<a href="###" onclick="fill('<?=$item->ProductID?>','<?=$item->ProductModel?>','<?=$item->ProductName?>','<?=$item->ProductDetail?>','<?=$item->Sizecm?>','<?=$item->WeightG?>')">选择</a>
		</td>
	</tr>
	<?php
    }
    ?>
</table>
<div id="pager" align="center">
<?php  
	$this->widget('CLinkPager',array(  
		'header'=>'',  
		'firstPageLabel' => '<<',
		'lastPageLabel' => '>>',
		'prevPageLabel' => '<',
		'nextPageLabel' => '>',
		'pages' => $pages,  
		'maxButtonCount'=>13  
		));  
?>
</div>